<template>
    <div id="login">
        <div class="login-box">
            <div class="title">
                欢迎登陆
            </div>
            <div class="input-area">
                <div class="username">
                    <div class="center icon">
                        <i class="el-icon-user"></i>
                    </div>
                    <div class="input">
                        <el-input
                            v-model="username"
                            placeholder="用户名"
                        ></el-input>
                    </div>
                </div>
                <div class="password">
                    <div class="center icon">
                        <i class="el-icon-lock"></i>
                    </div>
                    <div class="input">
                        <el-input
                            v-model="password"
                            placeholder="请输入密码"
                            show-password
                        ></el-input>
                    </div>
                </div>
            </div>
            <div class="submit">
                <div class="center">
                    登陆
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        data () {
            return {
                username: '',
                password: ''
            };
        }
    };
</script>

<style lang="less" scoped>
@import '~assets/styles/variable';
#login {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    background: url('~assets/images/login-bg.jpg') no-repeat center / cover;
    .login-box {
        width: 300px;
        margin-right: 160px;
        border-radius: 10px;
        padding-bottom: 20px;
        background-color: @color-content-background;
        &>div {
            padding: 0 20px;
        }
        .title{
            line-height: 50px;
            font-weight: bold;
            border-bottom: 1px solid #e8eaec;
        }
        .input-area {
            padding: 20px;
            &>div {
                display: flex;
                height: 30px;
                background-color: #f8f8f9;
                border: 1px solid #dcdee2;
                margin-top: 10px;
                .icon {
                    width: 30px;
                    flex-shrink: 0;
                    border-right: 1px solid #dcdee2;
                }
                .input {
                    flex-grow: 1;
                    /deep/.el-input {
                        input {
                            border: none;
                            height: 28px;
                            &:focus {
                                box-shadow: none;
                            }
                        }
                    }
                }
            }
        }
        .submit {
            div {
                height: 30px;
                color: @color-text-main;
                font-size: @font-size-medium;
                border-radius: 4px;
                background-color: #2d8cf0;
            }
        }
    }
}
</style>
